<template>
  <div class="homePageWrap">
    <div class="homePageTitle">
      <div class="logoWrap"></div>
      <h1 class="titleWarp">{{ title }}</h1>
    </div>
    <div class="mainWrap">
      <div class="entranceWrap">
        <div class="entrance entranceLeft" @click="goPage(0)">进入考试页面</div>
        <div class="entrance entranceRight" @click="goPage(1)">
          进入管理页面
        </div>
      </div>
    </div>
    <div class="footerWrap">技术支持：广州玉才科技有限公司</div>
  </div>
</template>

<script setup lang="ts">
// import { useRoute } from "vue-router";
defineOptions({
  name: "HomePage",
  inheritAttrs: false,
});

const router = useRouter();
const route = useRoute();
const title = computed(() => {
  return route.query?.title || "金砖大赛食品安全快速检测赛项管理系统";
});

/** 跳转页面 */
function goPage(type?: number) {
  if (type) {
    router.push(`/login`);
  } else {
    router.push(`/elogin`);
  }
}

onMounted(() => {});
</script>

<style lang="scss" scoped>
.titleWarp {
  margin-left: 0px !important;
}
</style>
